MIdiMapper{

	classvar init = 0, controlsMidiMap;
	
	*init{
		init = 1;	
		
		
		controlsMidiMap = Dictionary.new;
		
		controlsMidiMap.put(\len, 				8);
		controlsMidiMap.put(\attack, 			9);
		controlsMidiMap.put(\decay, 			10);
		controlsMidiMap.put(\volume, 			12);
		controlsMidiMap.put(\loopLength, 		53);
		controlsMidiMap.put(\startOffset, 		13);
		controlsMidiMap.put(\tremeloRate, 		14);
		controlsMidiMap.put(\tremeloDepth, 		15);
		controlsMidiMap.put(\startPosEvolveChance, 7);
		controlsMidiMap.put(\startPosEvolveDist, 	23);
		controlsMidiMap.put(\pan, 				56);
		controlsMidiMap.put(\patternLength,		25);
		controlsMidiMap.put(\timescale,  		26);
		controlsMidiMap.put(\patternPause, 		20 );
		controlsMidiMap.put(\pitchDown,  		55);
	
		
	}

	*getDefMapForControl{|controlName|
		if(init == 0){
			this.init;
		}
	^controlsMidiMap.at(controlName);
	
	}
}